package com.xsf.pay.controller;

import com.xsf.pay.common.domain.Result;
import com.xsf.pay.entity.dto.VerifyCodeDto;
import com.xsf.pay.service.CommonService;
import jakarta.annotation.Resource;
import jakarta.validation.Valid;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

/**
 * 通用接口
 *
 * @author 18961
 */
@RestController("common")
public class CommonController {
    @Resource
    private CommonService commonService;

    /**
     * 获取验证码
     * @param verifyCodeDto 请求参数
     * @return 是否发送成功
     */
    @PostMapping("/getVerifyCode")
    public Result<Object> getVerifyCode(@RequestBody @Valid VerifyCodeDto verifyCodeDto) {
        return commonService.getVerifyCode(verifyCodeDto);
    }
}
